import request from '@/utils/request'

// 查询民情动态列表
export function listPublicOpinion(query) {
  return request({
    url: '/PublicOpinion/PublicOpinion/list',
    method: 'get',
    params: query
  })
}

// 查询民情动态详细
export function getPublicOpinion(opinionId) {
  return request({
    url: '/PublicOpinion/PublicOpinion/' + opinionId,
    method: 'get'
  })
}

// 新增民情动态
export function addPublicOpinion(data) {
  return request({
    url: '/PublicOpinion/PublicOpinion',
    method: 'post',
    data: data
  })
}

// 修改民情动态
export function updatePublicOpinion(data) {
  return request({
    url: '/PublicOpinion/PublicOpinion',
    method: 'put',
    data: data
  })
}

// 删除民情动态
export function delPublicOpinion(opinionId) {
  return request({
    url: '/PublicOpinion/PublicOpinion/' + opinionId,
    method: 'delete'
  })
}
